package cn.initcap.session;

import cn.initcap.properties.SecurityProperties;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.web.session.InvalidSessionStrategy;


/**
 * 默认的session失效处理策略
 *
 * @author initcap
 * @date 2018/5/24 PM2:02
 */
public class InitcapInvalidSessionStrategy extends AbstractSessionStrategy implements InvalidSessionStrategy {

    public InitcapInvalidSessionStrategy(SecurityProperties securityProperties) {
        super(securityProperties);
    }

    @Override
    public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException {
        onSessionInvalid(request, response);
    }

}
